<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class MemberRank extends Model
{
    use HasFactory, SoftDeletes;

    protected $fillable = [
        'member_id', 'store_id',
        'total_money',
        'total_assistant_minutes', 'total_assistant_count', 'total_assistant_project_count', 'total_assistant_project_minutes', 'total_point',
        'count_date'
    ];

    protected $casts = [
        'count_date' => 'date'
    ];

    public function member()
    {
        return $this->belongsTo(Member::class);
    }

    public function store()
    {
        return $this->belongsTo(Store::class);
    }
}
